$(function(){
    $(".btn-primary").click(function(){

            var article_type_name = $('.article_type_name').val();
            if(article_type_name==''){
                errorTips('btn-primary',$(".article_type_name"),"请输入分类名称");
                return ;
            }
            /*
             *表单提交
             */
                var uri = $("#at_add").attr("action");
                var data = $("form[id=at_add]").serialize();
                ajaxPost(uri, $(".btn-primary"), data, function(r){
                    $(".btn-primary").removeAttr("disabled");
                    location.href = r.url;
                });
            });


});